﻿//****************************************************************************
// Copyright (c) 2010 All Right Reserved, http://www.sublight.si/
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from
// the use of this software.
//
// The origin of this software must not be misrepresented; you must not claim
// that you wrote the original software. If you use this software in a product,
// an acknowledgment in the product documentation is required.
//
// Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
//
// The source code of the program may be copied and used for educational,
// non-commercial purposes. The source code may be modified if desired,
// to suit the user.
//
// This notice may not be removed or altered from any source distribution.

using System;
using NConsoler;

namespace SublightCmd
{
    partial class Program
    {
        static void Main(string[] args)
        {
            //Please note: if you are developing your own application then please use different API key.
            //You can get new API key if you write us an email: contact@sublight.si
            //If you do not follow this we may ban existing API key and users will not be able to use some Sublight based applications.
            if (IsRunningOnMono)
            {
                Sublight.Lib.Session.Util.SetClientInfo("SublightCmd (Unix)", "6fb5a4d6-e1cd-4209-bf71-6a12ecbbe270");
            }
            else
            {
                Sublight.Lib.Session.Util.SetClientInfo("SublightCmd", "12c72276-b95f-4144-bb2a-879775c71437");
            }
            Consolery.Run(typeof(Program), args);

            //Console.ReadLine();
        }

        internal static bool IsRunningOnMono
        {
            get
            {
                if (_isRunningOnMono == null)
                {
                    _isRunningOnMono = Type.GetType("Mono.Runtime") != null;
                }

                return _isRunningOnMono.Value;
            }
        }

        private static bool? _isRunningOnMono;
    }
}
